Skip to content

Conversation

Copy link

Copilot AI commented Dec 16, 2025

Reimplements the deprecated Blender Internal renderer (removed in 2.8) as a custom RenderEngine addon with scanline rasterization.

Core Implementation

RenderEngine (BlenderInternalRenderEngine)

  • Scanline rasterizer with perspective projection and point-in-polygon testing
  • Material extraction from Principled BSDF nodes and legacy diffuse colors
  • Lambertian diffuse lighting: final_color = base_color × light_color × max(0, normal · light_dir)
  • Three light types with proper directional calculations:
    • Sun: parallel rays from rotation matrix
    • Point: direction computed from light position to surface center
    • Spot: directional cone from rotation matrix

Rendering Pipeline

  1. Evaluate depsgraph → extract camera matrix and lights
  2. Transform mesh vertices to camera space
  3. Project to screen space with depth culling (z > 0.1)
  4. Calculate per-polygon lighting in world space
  5. Rasterize using bounding box scan with ray casting

Example Usage

# In Blender UI:
# Render Properties → Render Engine → "Blender Internal"
# F12 to render with classic BI workflow

# Programmatic:
bpy.context.scene.render.engine = 'BLENDER_INTERNAL'
bpy.ops.render.render()

Files

  • blender_internal_render.py - Main addon (340 lines)
  • BLENDER_INTERNAL_README.md - Technical documentation
  • QUICK_START.md - User guide with scene examples
  • .gitignore - Python cache exclusions

Limitations

Intentionally minimal implementation:

  • No textures, shadows, or reflections (scanline only, no raytracing)
  • No viewport preview (final render only)
  • No distance attenuation for point lights
  • No anti-aliasing or complex material properties
Original prompt

You're gonna reimplement the old internal Blender Render Engine.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits December 16, 2025 02:54
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Co-authored-by: ExtCan <60326708+ExtCan@users.noreply.github.com>
Copilot AI changed the title [WIP] Reimplement the old internal Blender Render Engine Reimplement Blender Internal render engine as custom addon Dec 16, 2025
Copilot AI requested a review from ExtCan December 16, 2025 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants